package com.tsd.system.dao;

import com.tsd.core.vo.PageBean;
import com.tsd.system.entity.SysUserRole;
import com.tsd.system.entity.SysUserRoleExt;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;


/**
 * 描述：SysUserRoleMapper
 *
 * @author Hillpool
 * @date 2019/03/12 12:20:51
 */
public interface SysUserRoleMapper {

    SysUserRole selectByPrimaryKey(Long id);

    List<SysUserRole> selectByPage(@Param("params") Map<String, Object> params, @Param("page") PageBean page);

    int deleteByPrimaryKey(Long id);

    int insert(SysUserRole record);

    int insertSelective(SysUserRole record);

    int updateByPrimaryKey(SysUserRole record);

    int updateByPrimaryKeySelective(SysUserRole record);

    void updateSynced(Long id);

    void updateNeedSyncByRoleSid(String role_sid);

    SysUserRole selectOld(SysUserRole record);

    List<SysUserRoleExt> selectByUserSid(@Param("params") Map<String, Object> params);

    List<SysUserRole> selectByRoleSid(@Param("role_sid") String role_sid);

    List<SysUserRoleExt> selectByRoleSidGroupSid(@Param("role_sid") String role_sid, @Param("org_group_sid") String org_group_sid);

    List<SysUserRoleExt> selectUserRoleExtByRoleSid(@Param("role_sid") List<String> role_sid);

    int deleteLogicalByPrimaryKey(SysUserRole record);

    List<SysUserRole> selectSync();

    int insertList(List<SysUserRole> list);
}
